﻿<!--路由地址-->
@page "/employeeoverview"
<!--将他和后台代码关联起来-->
@inherits EmployeeOverviewBase


<h3>EmployeeOverview</h3>

<table class="table table-hover table-striped">
    <thead>
        <tr>
            <th>ID</th>
            <th>部门</th>
            <th>姓名</th>
            <th>出生日期</th>
            <th>性别</th>
            <th>操作</th>
            <th>ID</th>
        </tr>
    </thead>

    <tbody>
        @foreach (var em in Employee)
        {
            <tr>
                <td>@em.Id</td>
                <td>@em.DepartmentId</td>
                <td>@em.Name</td>
                <td>@em.BirthDate</td>
                <td>@em.Gender</td>
                <td>
                    <a href="@($"employeedetail/{em.Id}")" class="btn btn-primary btn-sm">详情</a>
                    <a href="@($"employeeedit/{em.DepartmentId}/{em.Id}")" class="btn btn-primary btn-sm">编辑</a>
                </td>
            </tr>
        }
    </tbody>

</table>


<!--4.写一个单击事件-->
<button class="btn btn-primary" @onclick="@SayHello">和JavaScript交互</button>
<h2>@Result</h2>